package b3.widget.home.user
{
	import b3.net.*;
	import b3.widget.basic.*;
	import b3.widget.mail.*;
	import b3.util.*;
	
	import flash.events.*;
	import flash.text.*;
	import flash.filters.*;

	public class AdminPane extends BasicWidget
	{
		public function AdminPane()
		{
			super();
			//背景
			var DialogBgr:Class = ResourceHelper.getInstance().getClassByName("MessageBoxBgr");
			addChild(new DialogBgr());
			//标题
			var titleField:TextField = new TextField();
			titleField.selectable = false;
        	titleField.autoSize = TextFieldAutoSize.CENTER;
			titleField.defaultTextFormat = new TextFormat(BFont.fontName, 20, 0xFFFFFF, true);
			titleField.filters = [new GlowFilter(0x00AAFF, 1, 1.3, 1.3, 100, BitmapFilterQuality.HIGH)];
			titleField.x = this.width / 2;
			titleField.y = 20;
			titleField.text = "管理员界面";
			addChild(titleField);
			//发送邮件
			var mailSendIcon:MailSendIcon = new MailSendIcon();
			mailSendIcon.x = 100;
			mailSendIcon.y = 100;
			addChild(mailSendIcon);
			this.anchor = BasicWidget.ANCHOR_MIDDLE_MIDDLE;
			this.x = -this.width / 2;
			this.y = -this.height / 2;
			//关闭按钮
			var ButtonBgr:Class = ResourceHelper.getInstance().getClassByName("CloseButton1");
			var buttonOK:BasicButton = new BasicButton(ButtonBgr);
			buttonOK.x = (this.width  - buttonOK.width) / 2;
			buttonOK.y = 276;
			buttonOK.addEventListener(MouseEvent.CLICK, onButtonOKClick);
			addChild(buttonOK);
		}
		
		private function onButtonOKClick(event:MouseEvent):void
		{
			close();
		}
        
		
	}
}